package com.muqi.app.qlearn.student.ui;

import com.muqi.app.qlearn.modles.Priase;
import com.muqi.app.qlearn.student.BaseFragmentActivity;
import com.muqi.app.qlearn.student.R;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class HomeDialogActivity extends BaseFragmentActivity {

	private ImageView mIv;
	private ImageView mIvClose;
	private int type;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// ////设置为true点击区域外消失
		setFinishOnTouchOutside(false);//
		setContentView(R.layout.activity_home_dialog);
		

	}

	@Override
	protected void onInit() {

		mIvClose = (ImageView) findViewById(R.id.home_dialog_close);
		mIv = (ImageView) findViewById(R.id.home_dialog_iv);
		type = getIntent().getIntExtra("type", 0);
		if (type == Priase.boy_help.ordinal()) {
			mIv.setImageResource(R.drawable.boy_help);
			
		} else if (type == Priase.boy_art.ordinal()) {
			mIv.setImageResource(R.drawable.boy_art);
			
		} else if (type == Priase.boy_think.ordinal()) {
			mIv.setImageResource(R.drawable.boy_think);
		} else if (type == Priase.boy_study.ordinal()) {
			mIv.setImageResource(R.drawable.boy_study);
		} else if (type == Priase.boy_sport.ordinal()) {
			mIv.setImageResource(R.drawable.boy_sport);
		} else if (type == Priase.girl_art.ordinal()) {
			mIv.setImageResource(R.drawable.girl_art);
		} else if (type == Priase.girl_help.ordinal()) {
			mIv.setImageResource(R.drawable.girl_help);
		} else if (type == Priase.girl_sport.ordinal()) {
			mIv.setImageResource(R.drawable.girl_sport);
		} else if (type == Priase.girl_study.ordinal()) {
			mIv.setImageResource(R.drawable.girl_study);
		} else if (type == Priase.girl_think.ordinal()) {
			mIv.setImageResource(R.drawable.girl_think);
		}
		mIvClose.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				finish();

			}
		});

	}

	@Override
	protected void onData() {

	}

}
